package com.spark.lola.entity;

import com.spark.lola.support.api.entity.TokenUser;
import com.spark.lola.support.common.entity.ShiroUser;

/**
 * 供应商token
 * @Author: DengYeJun
 * @Date: 2020/5/7 11:22
 */
public class SupplierToken extends TokenUser {
    private static final long serialVersionUID = 4919711528635465422L;
    private Long supplierId;
    private String areaIds;
    private Integer certificationStatus;

    public Long getSupplierId() {
        return supplierId;
    }

    public void setSupplierId(Long supplierId) {
        this.supplierId = supplierId;
    }

    public String getAreaIds() {
        return areaIds;
    }

    public void setAreaIds(String areaIds) {
        this.areaIds = areaIds;
    }

    public Integer getCertificationStatus() {
        return certificationStatus;
    }

    public void setCertificationStatus(Integer certificationStatus) {
        this.certificationStatus = certificationStatus;
    }

    public ShiroUser getShiroUser(){
        String name = "供应商-" + this.username;
        ShiroUser user = new ShiroUser();
        user.setRealName(name);
        user.setLoginNo(name);
        return user;
    }
}
